package edu.ustb.efws;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 系统入口
 *
 * @author TS Group
 */
@EnableScheduling
@SpringBootApplication
@MapperScan(basePackages = {"edu.ustb.efws.base.mapper", "edu.ustb.efws.meter.mapper", "edu.ustb.efws.pipeline.mapper"})
@EnableConfigurationProperties(value = {EfwsProperties.class})
public class EfwsApplication {
    private static final Logger LOGGER = LoggerFactory.getLogger(EfwsApplication.class);

    public static void main(String[] args){

        ApplicationContext context = new SpringApplicationBuilder(EfwsApplication.class)
                .web(WebApplicationType.SERVLET)
                .run(args);

        for(String name: context.getBeanDefinitionNames()){
            LOGGER.trace("Instance bean name={}", name);
        }
    }
}
